package com.flower.enjoyment.flower.mapper;

import com.flower.enjoyment.flower.entity.FlowerCardOrder;
import com.flower.enjoyment.flower.entityDo.FlowerCardDo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface FlowerCardOrderMapper {
    int deleteByPrimaryKey(String id);

    int insert(FlowerCardOrder record);

    int insertSelective(FlowerCardOrder record);

    FlowerCardOrder selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(FlowerCardOrder record);

    int updateByPrimaryKeyWithBLOBs(FlowerCardOrder record);

    int updateByPrimaryKey(FlowerCardOrder record);

    /**
     * 根据订单号获取订单信息
     * @param no
     * @return
     */
    FlowerCardOrder selectCardOrderByNo(String no);

    /**
     * 将订单置为过期
     * @return
     */
    int updateExpireCardOrder();

    List<FlowerCardDo> selectByUserId(@Param("userId") String userId);
}